package com.han.transfer.util;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

/**
 * @author HanJiafeng
 * @date 2021/6/9 16:58
 * @desc todo
 */
public class Tool {
    public static void save(BufferedImage bufferedImage, String path) {
        try {
            ImageIO.write(bufferedImage, "png", new File(path + ".png"));
        } catch (IOException ioException) {
            ioException.printStackTrace();
        }
    }
}
